package com.qianfeng.job;

import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;

public class TestJob3 {


    public static void main(String[] args) throws SchedulerException {

        //创建Job对象
        JobDetail jobDetail = JobBuilder.newJob(HelloJob.class).build();

        //
        CronTrigger trigger = TriggerBuilder.newTrigger()
                .withIdentity("t1", "tg1")
                .startNow()
                .withSchedule(CronScheduleBuilder.cronSchedule("0 27 19 * * ?"))
                .build();

        Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();

        scheduler.scheduleJob(jobDetail,trigger);

        scheduler.start();

    }
}
